<template>
  <div>
    <div class="header">
      <div class="top-head">
        <span>看装修登录中心</span>
        <p>商家服务热线：<span>0731-83869360</span></p>
      </div>
      <div class="top-nav">
        <div class="logo" style="cursor:pointer" @click="goIndex">
          <img src="../assets/image/logo.png">
        </div>
        <div class="topnav-right">
          <img src="" alt="">
        </div>
      </div>
    </div>
    <div class="regist-box">
      <div class="regist-content">
        <div class="regist-form">
          <div class="rf-btn">
            <span class="rf-com cur">公司登录</span>
          </div>
          <div id="com-login-box" class="cop-box">
            <div class="per-two">
              <div class="pub-input">
                <span class="pub-input-title">手机号码:</span>
                <input type="text" class="pub-inputbox" v-model="account">
              </div>
              <div class="pub-input">
                <span class="pub-input-title">登录密码:</span>
                <input type="password" class="pub-inputbox" v-model="password">
              </div>
              <span class="per-one-btn" @click="submit">公司登录</span>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="bottom2">
      <p>Copyright © 2015| All Rights Reserved.  湘ICP备15015649号-1 传众传媒</p>
    </div>
  </div>
</template>

<script>
import $ from 'jquery'
export default {
  data () {
    return {
      account: '',
      password: ''
    }
  },
  methods: {
    submit: function () {
      var that = this
      $.ajax({
        url: that.$axios.gp + '/Account/Login',
        type: 'post',
        data: {
          Phone: that.account,
          PassWord: that.password
        },
        dataType: 'jsonp',
        success: function (data) {
          console.log('t')
          if (data.code === 0) {
            that.$router.push({ name: 'inforAdd' })
          }
          if (data.code === -1) {
            that.$axios.messageTwo(data.data, '提示')
          }
        },
        error: function (data) {
        }
      })
    },
    goIndex: function () {
      window.location.href = this.$axios.link
    }
  },
  mounted () {
  }
}
</script>

<style scope>
.regist-box{
  width: 100%;
  height: 650px;
  background: url(../assets/image/registback.jpg) no-repeat center;
}
.regist-content{
  width: 1100px;
  height: 100%;
  margin: 0 auto;
  position: relative;
}
.regist-form{
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 340px;
  height: auto;
  padding: 26px;
  border-radius: 5px;
  background: #fff;
}
.rf-btn{
  margin-bottom: 25px;
  font-size: 16px;
  color: #646464;
  text-align: center;
}
.rf-per{
  padding-right: 30px;
  border-right: #d8d8d8 solid 1px;
  cursor: pointer;
}
.rf-btn .cur{
  color: #d60000;
}
.rf-com{
  cursor: pointer;
}
.pub-input{
  height: 40px;
  margin-top: 12px;
  border-radius: 5px;
  border: #d8d8d8 solid 1px;
  box-sizing: border-box;
}
.pub-input-title{
  float: left;
  width: 62px;
  text-align: right;
  font-size: 12px;
  color: #646464;
  line-height: 38px;
}

.pub-inputbox{
  width: 200px;
  margin-left: 10px;
  height: 30px;
  margin-top: 4px;
  border: none;
  font-size: 12px;
  color: #646464;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
}
.pre-step{
  display: block;
  height: 40px;
  margin-top: 12px;
  border-radius: 5px;
  line-height: 38px;
  text-align: center;
  border: #d8d8d8 solid 1px;
  color: #646464;
  cursor: pointer;
  box-sizing: border-box;
}
.per-one-btn{
  display: block;
  height: 40px;
  margin-top: 12px;
  border-radius: 5px;
  line-height: 40px;
  text-align: center;
  background: #00ca85;
  color: #fff;
  cursor: pointer;
  box-sizing: border-box;
}
.send-code{
  display: inline-block;
  width: 90px;
  font-size: 12px;
  background: #00b115;
  color: #fff;
  padding: 5px 0;
  cursor: pointer;
  text-align: center;
  border-radius: 2px;
}
.send-code.cur{
  background: #ccc;
  color: #9c9c9c;
  cursor: default;
}
.bottom2 {
  background: #000;
  height: 60px;
  line-height: 60px;
}
.bottom2 p {
    text-align: center;
    color: #9f9f9f;
    font-size: 14px;
}
.header{
  width: 100%;
}
.top-head{
  height: 35px;
  background: #f2f2f2;
  color: #646464;
  font-size: 12px;
}
.top-head>span{
  float: left;
  line-height: 35px;
  margin-left: 30px;
  cursor: pointer;
}
.top-head>p{
  float: right;
  line-height: 35px;
  margin-right: 30px;
}
.top-head>p span{
  color: #ff3000;
}
.top-nav{
  height: 70px;
  background: #fff;
  border-bottom: #dbdbdb solid 1px;
}
.logo{
  width: 205px;
  height: 70px;
  float: left;
}
.logo img{
  width: 150px;
  margin: 10px 0 0 30px; 
}
</style>
